/**
 * 
 */
package com.kebo2.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.xml.client.DOMException;
import com.google.gwt.xml.client.Document;
import com.google.gwt.xml.client.XMLParser;

/**
 * @author Tim
 *The default parser for documents returned by the server
 */
public class Parser {
	
	private Document messageDom;
	
	public Document parseXml(String value) {
		try {
			messageDom = XMLParser.parse(value);
		}
		catch(DOMException e) {
			new UserInterface.notification(Kebo2.error.XML_PARSE);
			GWT.log(e.getMessage());
		}
		return messageDom;	
	}
}